package com.mybatiscore.jiaocheng.d04mybatis动态Sql;

import com.mybatiscore.Mapper.StudentMapper;
import com.mybatiscore.Util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class d04_set {
    /*
       set:<set></set>
            主要用于update语句中，动态生成set，同时去除多余的","；
     */
    @Test
    public void testSet(){
        SqlSession sqlSession = SqlSessionUtil.openSession();
        StudentMapper mapper = sqlSession.getMapper(StudentMapper.class);
        mapper.updateSet(1L,null,null);
        sqlSession.commit();
        sqlSession.close();
    }
}
